<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>from</title>
    <script type="text/javascript" src="js/jquery.js"> </script>
    <script type="text/javascript">
        $(()=>{
            // alert('jquery installed.');
        })
        function send_ajax(){
            $.post({
                url:'./getData',
                success:function (res){
                  $('#info').text(res)
                  //   alert(res)
                  // document.getElementById('info').setAttribute('title',res);
                    $('#info').attr('title',res)

              }
            })
        }

    </script>

</head>
<body>
<div>
    <button onclick="send_ajax()">click</button><br>
    <div>
        <h2 id="info" title="">
            nama
        </h2>
    </div>

</div>

</body>
</html>